#include "cpu/exec/template-start.h"

#define instr test

#if DATA_BYTE == 2 || DATA_BYTE == 4
static void do_execute () {
	DATA_TYPE result = (op_dest->val & op_src->val); 
    cpu.OF = 0;
	cpu.CF = 0;
	cpu.SF = (result >= 0);
	cpu.PF = ~(result ^ (result >> 1) ^ (result >> 2) ^ (result >> 3) ^ (result >> 4) ^ (result >> 5) ^ (result >> 6) ^ (result >> 7)) & 1; 
	cpu.ZF = (result == 0);
	print_asm("test %s, %s", op_src->str, op_dest->str);
}

make_instr_helper(r2rm)
make_instr_helper(i2rm)

#endif

#include "cpu/exec/template-end.h"
